// 应用常量
export const APP_CONFIG = {
  name: 'PowerBI Web版',
  version: '1.0.0',
  description: '基于 Vue3 + JavaScript 的数据可视化平台'
}

// 路由常量
export const ROUTES = {
  HOME: '/',
  DESIGNER: '/designer',
  DATA_MODEL: '/data-model',
  DATA_CLEANING: '/data-cleaning'
}

// 图表类型常量
export const CHART_TYPES = {
  BAR: 'bar',
  LINE: 'line',
  PIE: 'pie',
  SCATTER: 'scatter',
  TABLE: 'table'
}

// 数据类型常量
export const DATA_TYPES = {
  TEXT: 'text',
  NUMBER: 'number',
  DATE: 'date',
  BOOLEAN: 'boolean',
  CURRENCY: 'currency'
}

// 字段类别常量
export const FIELD_CATEGORIES = {
  DIMENSION: '维度',
  MEASURE: '度量值'
}

// 关系类型常量
export const RELATIONSHIP_TYPES = {
  ONE_TO_ONE: 'one-to-one',
  ONE_TO_MANY: 'one-to-many',
  MANY_TO_ONE: 'many-to-one',
  MANY_TO_MANY: 'many-to-many'
}

// 数据清洗操作常量
export const CLEANING_OPERATIONS = {
  REMOVE_EMPTY_ROWS: 'remove_empty_rows',
  REMOVE_DUPLICATES: 'remove_duplicates',
  FILL_MISSING: 'fill_missing',
  STANDARDIZE_TEXT: 'standardize_text',
  TRIM_WHITESPACE: 'trim_whitespace',
  VALIDATE_EMAIL: 'validate_email',
  VALIDATE_DATE: 'validate_date'
}

// 空值处理方式
export const NULL_HANDLING = {
  KEEP: 'keep',
  REMOVE: 'remove',
  FILL: 'fill',
  INTERPOLATE: 'interpolate',
  FORWARD: 'forward',
  BACKWARD: 'backward'
}

// 文本操作
export const TEXT_OPERATIONS = {
  TRIM: 'trim',
  LOWERCASE: 'lowercase',
  UPPERCASE: 'uppercase',
  REMOVE_SPECIAL: 'removeSpecial',
  STANDARDIZE: 'standardize'
}

// 数值操作
export const NUMBER_OPERATIONS = {
  REMOVE_OUTLIERS: 'removeOutliers',
  ROUND: 'round',
  NORMALIZE: 'normalize'
}

// 主题常量
export const THEMES = {
  LIGHT: 'light',
  DARK: 'dark',
  AUTO: 'auto'
}

// 消息类型
export const MESSAGE_TYPES = {
  SUCCESS: 'success',
  WARNING: 'warning',
  ERROR: 'error',
  INFO: 'info'
}

// 加载状态
export const LOADING_STATES = {
  IDLE: 'idle',
  LOADING: 'loading',
  SUCCESS: 'success',
  ERROR: 'error'
}

// 文件类型
export const FILE_TYPES = {
  EXCEL: 'excel',
  CSV: 'csv',
  JSON: 'json',
  XML: 'xml'
}

// 支持的文件扩展名
export const SUPPORTED_EXTENSIONS = {
  EXCEL: ['.xlsx', '.xls'],
  CSV: ['.csv'],
  JSON: ['.json'],
  XML: ['.xml']
}

// 默认配置
export const DEFAULT_CONFIG = {
  pageSize: 20,
  maxFileSize: 10 * 1024 * 1024, // 10MB
  chartColors: [
    '#409EFF', '#67C23A', '#E6A23C', '#F56C6C', 
    '#909399', '#C0C4CC', '#606266', '#303133'
  ],
  animationDuration: 300,
  debounceDelay: 300
}

// API 端点（如果有后端）
export const API_ENDPOINTS = {
  DATA_SOURCES: '/api/data-sources',
  REPORTS: '/api/reports',
  EXPORT: '/api/export',
  IMPORT: '/api/import'
}

// 错误代码
export const ERROR_CODES = {
  NETWORK_ERROR: 'NETWORK_ERROR',
  FILE_TOO_LARGE: 'FILE_TOO_LARGE',
  INVALID_FILE_TYPE: 'INVALID_FILE_TYPE',
  PARSE_ERROR: 'PARSE_ERROR',
  VALIDATION_ERROR: 'VALIDATION_ERROR'
}

// 权限常量
export const PERMISSIONS = {
  READ: 'read',
  WRITE: 'write',
  DELETE: 'delete',
  ADMIN: 'admin'
}

// 本地存储键名
export const STORAGE_KEYS = {
  THEME: 'powerbi_theme',
  USER_PREFERENCES: 'powerbi_user_preferences',
  RECENT_FILES: 'powerbi_recent_files',
  WORKSPACE: 'powerbi_workspace'
}



